package com.controller;

import com.entity.ReplyInfo;
import com.service.ReplyInfoService;
import com.vo.ResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 回复控制器
 *
 * @author lbb
 * @version 1.0
 * @date 2020.3.3
 */

@RestController
@RequestMapping("/api")
public class ReplyInfoController {
	@Autowired
	private ReplyInfoService replyInfoService;
	
	/**
	 * 回复
	 *
	 * @param replyInfo 回复信息
	 * @return
	 */
	@PostMapping("/replyInfo/add")
	public ResponseVO addReplyInfo(@RequestBody ReplyInfo replyInfo) {
		Boolean bool = replyInfoService.addReplyInfo(replyInfo);
		if (bool) {
			return new ResponseVO("200","评论成功",null);
		} else {
			return new ResponseVO("500","评论失败",null);
		}
	}
}
